#include "GameData.j"

#include "monster\\MonsterVo.j"

// 关于游戏的一些设置
library GameSetting initializer init requires InitFunction, GameData

    private function init takes nothing returns nothing
        // 设置敌对玩与中立敌对同盟 
        call SetPlayerAlliance(Player(5), Player(PLAYER_NEUTRAL_AGGRESSIVE), ALLIANCE_PASSIVE, true) 
        call SetPlayerAlliance(Player(6), Player(PLAYER_NEUTRAL_AGGRESSIVE), ALLIANCE_PASSIVE, true) 
        call SetPlayerAlliance(Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(5), ALLIANCE_PASSIVE, true) 
        call SetPlayerAlliance(Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(6), ALLIANCE_PASSIVE, true) 

        // 禁止边界染色，有些地形需要用到边界分隔，这样做了会不显示黑色 
        // call EnableWorldFogBoundary(false) 
        // 禁用迷雾 
        call FogEnable(false) 
        // 禁用黑色阴影 
        call FogMaskEnable(false) 
        call SetTimeOfDay( 12 ) 
        call UseTimeOfDayBJ( false ) 

        call SetTerrainFogEx( 1, 0.00, 100000.00, 0.00, 0.00, 0.00, 0.00 )
    endfunction

    // 初始化数据变量
    function initData takes nothing returns nothing
        // 设置指定难度英雄护甲减少百分比
        set udg_diff_hurt_ct[1] = 0.00
        set udg_diff_hurt_ct[2] = 0.02
        set udg_diff_hurt_ct[3] = 0.04
        set udg_diff_hurt_ct[4] = 0.15
        set udg_diff_hurt_ct[5] = 0.2
        set udg_diff_hurt_ct[6] = 0.25
        set udg_diff_hurt_ct[7] = 0.30 
        set udg_diff_hurt_ct[8] = 0.40 
        set udg_diff_hurt_ct[9] = 0.45 
        set udg_diff_hurt_ct[10] = 0.50

        // 设置英雄受到的伤害系数，怪物的可以在全局参数中设置
        set udg_diff_xs_qtg[1] = 0.05
        set udg_diff_xs_qtg[2] = 0.04
        set udg_diff_xs_qtg[3] = 0.04
        set udg_diff_xs_qtg[4] = 0.04
        set udg_diff_xs_qtg[5] = 0.04
        set udg_diff_xs_qtg[6] = 0.04 
        set udg_diff_xs_qtg[7] = 0.04
        set udg_diff_xs_qtg[8] = 0.04
        set udg_diff_xs_qtg[9] = 0.04
        set udg_diff_xs_qtg[10] = 0.04
    endfunction
endlibrary


